<template>
  <footer id="my-footer">
    <router-link
      class="footer-item"
      v-for="(item,index) in tabConfig"
      :key="index"
      :to="item.path"
    >
      <div>{{item.iconNumber}}</div>
      <div>{{item.tabText}}</div>
    </router-link>
  </footer>
</template>

<script>
import tabConfig from "../../data/tabConfig";
import { reactive } from "vue";
export default {
  setup() {
    const data = reactive({
      tabConfig,
    });

    return {
      ...data
    };
  },
};
</script>

<style lang="less" scoped>
#my-footer {
  height: 60px;
  width: 100%;
  background-color: #fff;
  border-top: 1px solid #ccc;
  color: #666;
  line-height: 20px;
  text-align: center;
  position: fixed;
  bottom: 0;
  display: flex;
  align-items: center;
}

.footer-item {
  flex: 0 0 33.33%;
  border-right: 1px solid #ccc;
}

// 这个是vue路由自动添加的类，可以作为高亮的时候使用
.router-link-active {
  color: #db5149;
}
</style>